/*
 * Copyright (C) 2020 Baidu, Inc. All Rights Reserved.
 */
package cn.xiaoxige.plugin.transform

import org.objectweb.asm.MethodVisitor
import org.objectweb.asm.Opcodes

class LifecycleMethodVisitor extends MethodVisitor {

    private def mClassName
    private def mMethodName

    LifecycleMethodVisitor(MethodVisitor methodVisitor, String className, String methodName) {
        super(Opcodes.ASM6, methodVisitor)
        this.mClassName = className
        this.mMethodName = methodName
    }

    @Override
    void visitCode() {
        super.visitCode()

        mv.visitLdcInsn("xiaoxige")
        mv.visitLdcInsn("cha ru ti shi...")
        mv.visitMethodInsn(Opcodes.INVOKESTATIC, "android/util/Log", "e", "(Ljava/lang/String;Ljava/lang/String;)I", false)
        mv.visitInsn(Opcodes.POP)
    }

    @Override
    void visitInsn(int opcode) {
        super.visitInsn(opcode)

    }

    @Override
    void visitEnd() {
        super.visitEnd()

    }
}